package cn.com.hessian.client;

import java.net.MalformedURLException;

import org.junit.Test;

import com.caucho.hessian.client.HessianProxyFactory;
import com.hessian.service.HelloService;

public class ServiceTest {
	
	@Test
	public void testService() throws MalformedURLException {
	//	String url = "http://localhost:9999/yesWeb/hessian";
		String url = "http://localhost:9999/yesWeb/hessian/service";
		System.out.println(url);
		
		HessianProxyFactory factory = new HessianProxyFactory();
		HelloService helloService = (HelloService)factory.create(HelloService.class, url);
		System.out.println(helloService.helloWorld("chenhanshun"));
	}
	
}
